package cn.microservices.cloud.system.web.convert;

import cn.microservices.cloud.system.api.bo.EmployeeBO;
import cn.microservices.cloud.system.api.dto.RegisterDTO;
import cn.microservices.cloud.system.api.dto.LoginDTO;
import cn.microservices.cloud.system.web.controller.auth.vo.RegisterVO;
import cn.microservices.cloud.system.web.controller.auth.vo.UserInfoVO;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

/**
 * 权限模块 实体转换 WEB <--> API
 */
@Mapper
public interface AuthConvert {

    AuthConvert INSTANCE = Mappers.getMapper(AuthConvert.class);

    /**
     * Web->api
     * @param registerDTO
     * @return
     */
    RegisterDTO convert(cn.microservices.cloud.system.web.controller.auth.dto.RegisterDTO registerDTO);

    /**
     * api->Web
     * @param registerVO
     * @return
     */
    RegisterVO convert(cn.microservices.cloud.system.api.vo.RegisterVO registerVO);
    RegisterVO convert(EmployeeBO employeeBO);
    UserInfoVO convert(cn.microservices.cloud.system.api.vo.UserInfoVO userInfoVO);
    LoginDTO convert(cn.microservices.cloud.system.web.controller.auth.dto.LoginDTO loginDTO);
}
